package com.ruipengkj.component.border;

import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;

import javax.swing.border.AbstractBorder;

/**
 * 只有下面边界的Border
 * */
public class BottomLineBorder extends AbstractBorder{
	private static final long serialVersionUID = 1L;
	private Color lineColor;
    public BottomLineBorder(Color color){
        lineColor = color;
    }

    public void paintBorder(Component c, Graphics g, int x, int y,
                            int width, int height){
    	
        g.setColor(lineColor);
        g.drawLine(0, 0, c.getWidth(), 0);
        g.drawLine(0, c.getHeight() - 1+20, c.getWidth(),c.getHeight()+20 - 1);
    }
}
